<?php
use yii\widgets\Breadcrumbs;
use dmstr\widgets\Alert;
use backend\models\Logs;
?>
<style>
    .content-header .breadcrumb{left:10px;right:auto;float:left;}
</style>
<div class="content-wrapper">
    <section class="content-header">


        <?=
        Breadcrumbs::widget(
            [
                'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
            ]
        ) ?>
    </section>

    <section class="content" style="overflow:auto">
        <?= Alert::widget() ?>
        <?= $content ?>
    </section>
</div>

<footer class="main-footer">
    <div class="pull-right hidden-xs">
        <b>Version</b> 1.0
    </div>
    <strong>Copyright &copy; 2018~ <a href="http://lianluo.com">联络</a>.</strong> All rights
    reserved.
</footer>

<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
    <!-- Create the tabs -->
    <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
        <li><a href="#control-sidebar-home-tab" id="myhome" data-toggle="tab"><i class="fa fa-home"></i></a></li>
<!--        <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>-->
    </ul>
    <!-- Tab panes -->
    <div class="tab-content">
        <!-- Home tab content -->
        <div class="tab-pane" id="control-sidebar-home-tab">
            <h3 class="control-sidebar-heading">最近的日志</h3>
            <ul class='control-sidebar-menu'>
                <?php $userid=Yii::$app->user->id;
                $logs = Logs::find()->where(['opid'=>$userid])->limit(12)->orderBy('id desc')->all();
                foreach($logs as $log){
                ?>
                <li>
                    <a href='javascript::;'>
                        <i class="menu-icon fa fa-birthday-cake bg-red"></i>

                        <div class="menu-info">
                            <h4 class="control-sidebar-subheading"><?=$log->oprtype?></h4>

                            <p><?=$log->oprtime?></p>
                        </div>
                    </a>
                </li>
                <?php }?>

            </ul>


        </div>

    </div>
</aside><!-- /.control-sidebar -->
<!-- Add the sidebar's background. This div must be placed
     immediately after the control sidebar -->
<div class='control-sidebar-bg'></div>